#ifndef PFS_SERVER_MAP_H
#define PFS_SERVER_MAP_H

#include "define"
#include "server_locate.h"
#include <stdint.h>
using namespace std;

namespace PFS
{
    class ServerMap
    {
        ServerMap()
        {}
        virtual ~ServerMap();
        void add_server(const uint64_t server_id, ServerLocate* serv);
        ServerLocate* replace_server(const uint64_t server_id, ServerLocate* new_serv);

        void remove_server(const uint64_t server_id);

        ServerLocate* find_server(const uint64_t server_id);

        bool exsit_server(const uint64_t server_id) const;

        char* get_server_addr(const uint64_t server_id);
        private:
        SERVER_MAP server_map;
    };
}
#endif
